{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os,cv2\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import torchvision.utils as vutils\n",
    "import torch\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'1.png'"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "PATH_RPLAN = os.path.join(\"E:\\\\Seafile\\\\data_RPLAN\",\"rplan_dataset\")\n",
    "\n",
    "names = os.listdir(PATH_RPLAN)\n",
    "name = names[1]\n",
    "name"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(256, 256, 4)"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data= cv2.imread(\n",
    "    os.path.join(PATH_RPLAN,name),\n",
    "    cv2.IMREAD_UNCHANGED\n",
    ")\n",
    "data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Users\\Luozn\\Anaconda3\\envs\\py36-luozn\\lib\\site-packages\\ipykernel_launcher.py:13: UserWarning: Matplotlib is currently using module://ipykernel.pylab.backend_inline, which is a non-GUI backend, so cannot show the figure.\n",
      "  del sys.path[0]\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtUAAALuCAYAAABhDuoFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3df4zddZ3v8ff7zLS0tJQCBasIYlF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Va9KwtAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 720x720 with 4 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = plt.figure(figsize=(10,10))\n",
    "for i in range(4):\n",
    "    ax = fig.add_subplot(2,2,i+1)\n",
    "    ax.imshow(data[:,:,(2-i)%4],cmap=\"gray\")\n",
    "    ax.axis(\"off\")\n",
    "    ax.set_title(\"channel {}\".format(str(i+1)))\n",
    "fig.subplots_adjust(left=0,\n",
    "                    bottom=0, \n",
    "                    right=1, \n",
    "                    top=1, \n",
    "                    wspace=0.03, \n",
    "                    hspace=0.08)\n",
    "fig.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "| channel 1     |     | channel 2     |    | channel 3                                                                                                                    |   | channel 4     |      |   |   |\n",
    "|---------------|-----|---------------|----|------------------------------------------------------------------------------------------------------------------------------|---|---------------|------|---|---|\n",
    "| Exterior wall | 127 | Living room   | 0  | Diﬀerent integers are used to distinguish diﬀerent rooms with the same labels. (starting from 1 and 0 for the non-room area) |   | Exterior area | 0    |   |   |\n",
    "| Front door    | 255 | Master room   | 1  |                                                                                                                              |   | Interior area | 255  |   |   |\n",
    "| Other         | 0   | Kitchen       | 2  |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | Bathroom      | 3  |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | Dining room   | 4  |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | Child room    | 5  |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | Study room    | 6  |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | Second room   | 7  |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | Guest room    | 8  |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | Balcony       | 9  |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | Entrance      | 10 |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | Storage       | 11 |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | Wall-in       | 12 |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | External area | 13 |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | Exterior wall | 14 |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | Front door    | 15 |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | Interior wall | 16 |                                                                                                                              |   |               |      |   |   |\n",
    "|               |     | Interior door | 17 |                                                                                                                              |   |               |      |   |   |\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "0ce3601723b61390a7ee5a52e85c3546f15cbfb73b55cdd62082b8ae108b5d1a"
  },
  "kernelspec": {
   "display_name": "Python 3.6.9 64-bit ('py36-luozn': conda)",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
